﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewContract.aspx.cs" Inherits="NewContract" %>

<!DOCTYPE html> 
<html> 
	<head id="Head1" runat="server"> 
        <meta charset="utf-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <title>运维合同预警</title> 
        <link href="Content/jquery.mobile-1.2.0.min.css" rel="stylesheet" type="text/css" />
        <script src="Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery.mobile-1.2.0.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery.validate.min.js" type="text/javascript"></script>
        <link href="Content/Default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
            $.mobile.ajaxEnabled = false;
            $(function () {
                $("#form1").validate({
                    rules: {
                        ContractNo: "required",
                        StationName:"required",
                        OtherName:"required",
                        ContractValue:"required",
                        BeginDate:{
                            required:true,
                            dateISO:true
                        },
                        EndDate:{
                            required:true,
                            dateISO:true
                        }
                    },
                    messages: {
                        ContractNo: "请输入合同号",
                        StationName:"请输入基站名称",
                        OtherName:"请输入对方名称",
                        ContractValue:"请输入合同金额",
                        BeginDate:{
                            required:"请输入起始日期",
                            dateISO:"请输入正确的日期格式"
                        },
                        EndDate:{
                            required:"请输入终止日期",
                            dateISO:"请输入正确的日期格式"
                        }
                    }
                });
            });
        </script>
    </head> 
<body>     
    <!-- start page -->
    <div data-role="page">

	<!-- start header -->
	<div data-role="header" data-theme="c" data-position="inline" data-backbtn="false">
        <a href="desktop.aspx" data-icon="home">桌面</a>
		<h1>运维合同预警</h1>
        <a href="default.aspx" data-icon="forward">退出</a>
	</div>
	<!-- end header -->

	<!-- start content -->
	<div data-role="content">	
    <form id="form1" runat="server" action="NewContract.aspx" method="post">
        <ul data-role="listview" data-inset="true">
            <asp:Literal runat="server" ID="msg"></asp:Literal>
            <asp:Literal runat="server" ID="CIDlabel" Visible="false"></asp:Literal>
            <asp:Literal runat="server" ID="RenewLabel" Visible="false"></asp:Literal>
            <li data-role="fieldcontain">
	        	<label for="ContractNo">合同号:</label>
                <asp:TextBox runat="server" ID="ContractNo" MaxLength="64"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<fieldset data-role="controlgroup">
			    	<legend>县分:</legend>
                     <asp:RadioButtonList runat="server" ID="RegionList" RepeatLayout="Flow" RepeatDirection="Horizontal">
                     </asp:RadioButtonList>
			    </fieldset>
			</li>
			<li data-role="fieldcontain">
	        	<label for="StationName">基站名称:</label>
                <asp:TextBox runat="server" ID="StationName" MaxLength="64"></asp:TextBox>
			</li>
            <!--to do sale date input-->
			<li data-role="fieldcontain">
	        	<fieldset data-role="controlgroup">
			    	<legend>基站类型:</legend>
                     <asp:RadioButtonList runat="server" ID="StationType" RepeatLayout="Flow" RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True">宏基站</asp:ListItem>
                        <asp:ListItem>微基站</asp:ListItem>
                        <asp:ListItem>接入网</asp:ListItem>
                     </asp:RadioButtonList>
			    </fieldset>
			</li>
			<li data-role="fieldcontain">
	        	<label for="OtherName">对方名称:</label>
                <asp:TextBox runat="server" ID="OtherName" MaxLength="32"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="BeginDate">起始日期:</label>
                <asp:TextBox ID="BeginDate" runat="server"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="EndDate">终止日期:</label>
	        	<asp:TextBox ID="EndDate" runat="server"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="ContractValue">合同金额:</label>
                <asp:TextBox runat="server" ID="ContractValue" MaxLength="16"></asp:TextBox>
			</li>
            <li data-role="fieldcontain">
	        	<fieldset data-role="controlgroup">
			    	<legend>付款方式:</legend>
                     <asp:RadioButtonList runat="server" ID="PayMode" RepeatLayout="Flow" RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True">现金</asp:ListItem>
                        <asp:ListItem>转账</asp:ListItem>
                     </asp:RadioButtonList>
			    </fieldset>
			</li>
			<li data-role="fieldcontain">
	        	<label for="ContactInfo">联系方式:</label>
                <asp:TextBox runat="server" ID="ContactInfo" MaxLength="32"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="AccountName">账户户名:</label>
                <asp:TextBox runat="server" ID="AccountName" MaxLength="10"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="OpenBank">开户行:</label>
                <asp:TextBox runat="server" ID="OpenBank" MaxLength="32"></asp:TextBox>
			</li>
			<li data-role="fieldcontain">
	        	<label for="AccountNo">账号:</label>
                <asp:TextBox runat="server" ID="AccountNo" MaxLength="32"></asp:TextBox>
			</li>
            <li data-role="fieldcontain">
	        	<label for="Desc">备注:</label>
			    <textarea cols="40" rows="8" name="Desc" id="Desc" runat="server"></textarea>
			</li>
            <li class="ui-body ui-body-b">
				<fieldset class="ui-grid-a">
						<div class="ui-block-a"><button type="reset" data-theme="c" id="reset" runat="server">重置</button>
                            <asp:Button runat="server" Text="保存" ID="save" data-theme="c" Visible="false" 
                                onclick="save_Click"/>
                        </div>
						<div class="ui-block-b">
                            <asp:Button runat="server" Text="提交" ID="submit" data-theme="c"
                                onclick="submit_Click"/>
                            <asp:Button runat="server" Text="删除" ID="delete" data-theme="c" Visible="false" 
                                onclick="delete_Click" />
                        </div>
			    </fieldset>
			</li>
        </ul>
    </form>
	</div>
	<!-- end content -->

	<!-- start footer -->
	<div data-role="footer" data-theme="c" class="ui-bar">
        <a href="ContractList.aspx" id="returnLink" data-transition="flip" data-icon="back">返回列表</a>
        <asp:Literal runat="server" Visible="false" ID="isAdd"></asp:Literal>
        <asp:Literal runat="server" Visible="false" ID="did"></asp:Literal>
	</div>
	<!-- end footer -->

	
    </div>
    <!-- end page -->
    
</body>
</html>
